{% extends "layout.html" %}
{% load static %}
{% block css %}
<script src="{% static 'plugins/axios/1.6.7/axios.min.js' %}"></script>
{% endblock %}
{% block content %}
<!-- 数据表格 -->
<table class="layui-table">
    <!-- 表格内容 S-->
    <table class="layui-table">
        <thead>
        <tr>
            <th>ID</th>
            <th>城市名称</th>
            <th>城市人口</th>
            <th>城市LOGO</th>
        </tr>
        </thead>
        <tbody>
        {% for item in data_list %}
        <tr>
            <td>{{item.id}}</td>
            <td>{{item.name}}</td>
            <td>{{item.count}}</td>
            <td>
                <img src="{{MEDIA_URL}}{{item.logo}}">
            </td>
            <td>
                <img src="/media/{{item.logo}}">
            </td>
        </tr>
        {% endfor %}
        </tbody>
    </table>
</table>
<!-- 分页区域 -->
<div id="LayPageComps"></div>



{% endblock %}

{% block js %}

<script src="{% static 'js/pagination.js' %}"></script>
<script>
    document.addEventListener('DOMContentLoaded', function() {
        initPagination('LayPageComps', {{totals}}, {{current_page}}, {{page_size}});
    });
</script>
{% endblock %}